/**
 * 作者: hxl
 * 日期: 2024-11-18 14:51:59
 * 备注: 秘书巡查表
 */
package com.motu.monstercity.server.game.commondata.patrol;

import io.vertx.core.json.JsonObject;

public class PatrolTableModel {
    protected int id; // ID
    protected int secretaryId; // 秘书ID
    protected int secretaryWeight; // 秘书权重
    protected String eventIdNot; // 事件1 (读取patrol_location表格中event_id)
    protected String eventWeightNot; // 事件1权重 (30;20;50)
    protected int fragmentNum; // 所需碎片 (该秘书所需碎片)
    protected String eventIdObtained; // 事件2 (读取patrol_location表格中的event_id)
    protected String eventWeightObtained; // 事件2权重 (30;20;50)

    public PatrolTableModel() {
    }

    public PatrolTableModel(JsonObject obj) {
        id = obj.containsKey("id") ? obj.getInteger("id") : 0;
        secretaryId = obj.containsKey("secretary_id") ? obj.getInteger("secretary_id") : 0;
        secretaryWeight = obj.containsKey("secretary_weight") ? obj.getInteger("secretary_weight") : 0;
        eventIdNot = obj.containsKey("event_id_not") ? obj.getString("event_id_not") : "";
        eventWeightNot = obj.containsKey("event_weight_not") ? obj.getString("event_weight_not") : "";
        fragmentNum = obj.containsKey("fragment_num") ? obj.getInteger("fragment_num") : 0;
        eventIdObtained = obj.containsKey("event_id_obtained") ? obj.getString("event_id_obtained") : "";
        eventWeightObtained = obj.containsKey("event_weight_obtained") ? obj.getString("event_weight_obtained") : "";
    }

    public int getId() {
        return id;
    }

    public int getSecretaryId() {
        return secretaryId;
    }

    public int getSecretaryWeight() {
        return secretaryWeight;
    }

    public String getEventIdNot() {
        return eventIdNot;
    }

    public String getEventWeightNot() {
        return eventWeightNot;
    }

    public int getFragmentNum() {
        return fragmentNum;
    }

    public String getEventIdObtained() {
        return eventIdObtained;
    }

    public String getEventWeightObtained() {
        return eventWeightObtained;
    }

}
